import VueRouter from 'vue-router'
// 导入对应的路由组件
import login from './login/login.vue'
import home from './home/home.vue'
import main from './home/Main.vue'
import StuList from "./student/StuList.vue"
import  ExamReport from "./report/ExamReport.vue"
import JobReport from "./report/JobReport.vue"
import updateMyInfo from "./user/UserInfo.vue"
import hwList from "./homework/HwList.vue"
import HwInfo from "./homework/HwInfo.vue"
import TchList from "./teacher/TchList.vue"
import PublishJob from "./homework/PublishJob.vue"
import Correct from "./homework/correct/correct.vue"
// 3. 创建路由对象
var router = new VueRouter({
    routes: [ // 配置路由规则
        {path: '/', redirect: '/login'},
        {path: '/login', component: login,name:'login'},
        {
            path: '/home',
            component: home,
            children: [
                { path: 'main', component: main ,name: 'main'},
                { path: 'student', component: StuList, name: 'student' },
                { path: 'TchList', component: TchList, name: 'TchList' },
                { path: 'examReport', component: ExamReport, name: 'examReport' },
                { path: 'jobReport', component: JobReport, name: 'jobReport' },
                { path: 'updateMyInfo', component: updateMyInfo, name: 'updateMyInfo' },
                { path: 'hwList', component: hwList, name: 'hwList' },
                { path: 'hwinfo', component: HwInfo, name: 'hwinfo' },
                { path: 'PublishJob', component: PublishJob, name: 'PublishJob' },
                { path: 'correct', component: Correct, name: 'correct' },
            ]
        },

    ],
    linkActiveClass: '' // 覆盖默认的路由高亮的类，默认的类叫做 router-link-active
})

// 把路由对象暴露出去
export default router
